//Title
Example network with one controlled intersection and two metered ramps

//Parameters 
;nrTimePeriods LengthTim LTimeStep ScaleFlow ScaleCap ScaleSpeed DemandPar
     7           900        20       1.00      1.00     1.00           0 

;nettype : number of subnetwork
;linktype: 0 = normal, 1 = controlled intersection, 2 = controlled ramp meter, 3 = roundabout
;link, 4 = give way link
;nrSG can be more than one, due to shared movements
;CTR is controller number, nrSG is the number of traffic signals which control the link and 
;Signal(s) are  the signal numbers. These should correspond with //TrafSignals.
;nrCL is number of conflicting links and ConfLinks are the numbers of the conflicting links
;(only for roundabouts and priority junctions).

//Links
;linknr nettype length nrlanes satflow   speed  type CTR  nrSG  Signal(s) nrCL ConfLinks
;                 (m)          (veh/hr) (km/hr)               
    1      1     2713     2      4200     120     0                          
    2      1      670     2      4200     120     0                          
    3      1     2045     2      4200     120     0                                             
    4      1     1046     2      4200     120     0                          
    5      2      500     1      2000      80     2   1     1      1                          
    6      1     1654     1      2000      80     0 
    7      1      500     1      2000      80     2   2     1      1                                
    8      1      715     1      2000      80     0      
    9      2      702     1      2000      70     1   3     1     11    
   11      2      999     2      3800      70     0                                         
   12      2      570     1      2000      70     0                          
   13      2      400     1      2000      70     1   3     1      8    
   14      2      400     1      1800      70     1   3     1      9  

;nodetype: 0 = normal, 1 = input node, 2 = output node, 3 = controlled node, 4 = node with ramp 
;metering, 5 = controlled node (FT), 6 = roundabout 1 lane, 7 = roundabout 2 lanes, 8 = give way node
;In this network link 13 is for through traffic and link 14 is a left turn. That means that some
;combinations for node 8 are not possible, e.g. also taking the off-ramp and then the on-ramp. These
;combinations are given a 1 and allowed combinations a 0. Route choice (if no routes are specified)
;will take this into account. For metered nodes an up and downstream link is specified. The algorithm
;checks the flow upstream and the capacity downstream and will not all more vehicles to enter the
;on-ramp (RWS algorithm).
;AllowedTurns can be used to block specific movements on a node. For every incoming link - outgoing
;link combination a 0 (movement is allowed) or 1 (movement is blocked) should be given.

//Nodes
;nodenr type nIn  links  nOut  links     AllowedTurns          
   1      1    0           1    1        
   2      0    1   1       2    2  9     
   3      4    2   2  7    1    3        
   4      4    2   3  5    1    4        
   5      2    1   4       0             
   6      0    1   8       1    7         
   7      0    1   6       1    5         
   8      3    3   9 13 14 3    6 8 12    0 1 0 0 1 0 1 0 1 
  10      1    0           1   11        
  11      2    1  12       0             
  12      0    1  11       2   13 14

//Origins
;nrOrigins nodenrs
    2        1 10                               

//Destinations
;nrDestinations nodenrs
     2            5 11                             

//OD table
;origin destination nRoutes Routenrs.   timeperiod 1 - timeperiod n
   1       5           1        1     3100 3800 3500 3000 2000 1000 1000         
   1      11           1        2      150  200  200  100  100  100  100 
  10       5           2       3  4   1000 1500 1200 1000  600  300  300 

;If distribution is specified MARPLE will use this to redistribute flows
;for the 4 LMS types: type 1: commuters, type 2: business, type 3: other
;travel purposes, type 4: trucks. For every OD pair and type a line must
;be specified with a distribution in percentage per time period.
//Distribution
;origin destination type   timeperiod 1 - timeperiod n
   1       5           1     80   80   80   70   70   80   80 
   1       5           2      5    5    5   15   15    5    5 
   1       5           3      5    5    5    5    5    5    5 
   1       5           4     10   10   10   10   10   10   10 
   1      11           1     60   60   60   60   60   60   60 
   1      11           2     15   15   15   15   15   15   15 
   1      11           3     15   15   15   15   15   15   15 
   1      11           4     10   10   10   10   10   10   10 
  10       5           1      0    0    0    0    0    0    0 
  10       5           2      0    0    0    0    0    0    0 
  10       5           3      0    0    0    0    0    0    0 
  10       5           4    100  100  100  100  100  100  100  

;If routes specified model will use these routes, otherwise it will generate it's own routes
;by Dijkstra algorithm. These routes are saved in 'routes.txt' and can be used later on.
;See also 'Routes' parameters in 'MARPLEparm.txt'.
//Routes
;Routenr nrLinksRoute Links
    1        4         1  2  3  4                
    2        3         1  9 12                     
    3        5        11 13  6  5  4                
    4        6        11 14  8  7  3  4             

//RouteParts
;RoutePnr nrLinksRouteP Links
     9        4          1  2  3  4                
    10        6          1  9  8  7  3  4                

//TrafSignals
;controller signal green cycle mingr maxgr
;                  (sec) (sec) (sec) (sec)
      3      11      14    97    7     40    
      3       8      40    97    7     40    
      3       9      33    97    7     40    

//RampMeters
;controller signal green cycle mingr maxgr uplink downlink percInc algCap 
;                  (sec) (sec) (sec) (sec)
      1       1      12    12    2     12      2       3       2    3500 
      2       1      12    12    2     12      3       4       2    3500 

//VMSinfo
;linknr  routeinfo  incident  deltaTeta
     11          1         0        1.0 

;userclass: 1=habitual, 2=unguided, 3=guided
;For the habitual travellers only the percentage has to be specified. The users are equally distributed on the available routes.
;For the other users the percentage and a teta is specified: level of information (the higher the more information travellers have).
//UserClasses
;userclass percentage teta  percEvents
    1        20        0.0      50
    2        40        1.0      25               
    3        40        3.0      25               

//UserClassTP
;userclass time penalty (% of travel time)
    1        0.0     
    2       20.0                       
    3        3.0                       

//NetTypePenalty
;nettype timeperiod 1 - timeperiod n
     2     1  1  1  1  1  1  1            

;user can specify initial flow distribution, if not present model calculates flow distribution
;based on distance or free flow (paramater initialAssign)
;;//InitialFlows
;Route timeperiod1 - timeperiodn
    1   3100 3800 3500 3000 2000 1000 1000            
    2    150  200  200  100  100  100  100    
    3    500  750  600  500  300  150  150        
    4    500  750  600  500  300  150  150 

;User can specify events, which can be used to change link attributes during the simulation
;This change is relative to old attribute.
//Events 
;begintime endtime linknr nrlanes satflow  vfree   type
;                                   (%)      (%)
     900      1500      4      -1    50       70      1
     900      2700      3      -1    50       70      2

;User can specify links for a selected link analysis, but also to change the OD flows
;which these links. A positive 'perc change' means extra traffic on that link. If this number
;is zero, only a selected link analysis is performed.
;This change is relative to old attribute.
//SelectedLinks 
;selected links  perc change 
		      3         5.0 
             11           0 			
   
//NetTolls (euro/km)
;nettype timeperiod1 - timeperiodn
    2      0.10  0.10  0.10  0.10  0.10  0.10  0.10
    1      0.10  0.10  0.10  0.10  0.10  0.10  0.10   
    
//LinkTolls
;linknr  toll (euro's)
    1      1.00  1.00  1.00  1.00  1.00  1.00  1.00  
    6      2.00  2.00  2.00  2.00  2.00  2.00  2.00    
    
;For visualisation purposes 
//NodeCoordinates   
;nodenr   x-coord   y-coord  
      1         0         0 
      2         6         0   
      3        12         0 
      4        20         0  
      5        26         0  
      6        10.5      -2  
      7        18.5      -2  
      8         9        -6  
     10         3        -6  
     11         9        -9    
     12         5        -6  
 

//InitialFlows
;Route timeperiod1 - timeperiodn
     1  3255.000  3990.000  3675.000  3150.000  2100.000  1050.000  1050.000
     2   150.000   200.000   200.000   100.000   100.000   100.000   100.000
     3   655.146  1219.252   861.201   918.160   562.965   276.766   247.976
     4   394.854   355.748   398.799   131.840    67.035    38.234    67.024
